import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/get_user_by_id_entity.dart';
import 'package:enterprise_v6_app/app/data/common/choice_bean.dart';


GetUserByIdEntity $GetUserByIdEntityFromJson(Map<String, dynamic> json) {
  final GetUserByIdEntity getUserByIdEntity = GetUserByIdEntity();
  final int? allocation = jsonConvert.convert<int>(json['allocation']);
  if (allocation != null) {
    getUserByIdEntity.allocation = allocation;
  }
  final String? areaCode = jsonConvert.convert<String>(json['areaCode']);
  if (areaCode != null) {
    getUserByIdEntity.areaCode = areaCode;
  }
  final String? avatar = jsonConvert.convert<String>(json['avatar']);
  if (avatar != null) {
    getUserByIdEntity.avatar = avatar;
  }
  final String? birthday = jsonConvert.convert<String>(json['birthday']);
  if (birthday != null) {
    getUserByIdEntity.birthday = birthday;
  }
  final int? branchPersonInCharge = jsonConvert.convert<int>(json['branchPersonInCharge']);
  if (branchPersonInCharge != null) {
    getUserByIdEntity.branchPersonInCharge = branchPersonInCharge;
  }
  final String? certificate = jsonConvert.convert<String>(json['certificate']);
  if (certificate != null) {
    getUserByIdEntity.certificate = certificate;
  }
  final String? certificateNum = jsonConvert.convert<String>(json['certificateNum']);
  if (certificateNum != null) {
    getUserByIdEntity.certificateNum = certificateNum;
  }
  final int? certificateRemind = jsonConvert.convert<int>(json['certificateRemind']);
  if (certificateRemind != null) {
    getUserByIdEntity.certificateRemind = certificateRemind;
  }
  final String? certificateUrl = jsonConvert.convert<String>(json['certificateUrl']);
  if (certificateUrl != null) {
    getUserByIdEntity.certificateUrl = certificateUrl;
  }
  final int? checkId = jsonConvert.convert<int>(json['checkId']);
  if (checkId != null) {
    getUserByIdEntity.checkId = checkId;
  }
  final int? chemistry = jsonConvert.convert<int>(json['chemistry']);
  if (chemistry != null) {
    getUserByIdEntity.chemistry = chemistry;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    getUserByIdEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    getUserByIdEntity.createBy = createBy;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    getUserByIdEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    getUserByIdEntity.deleted = deleted;
  }
  final int? departManager = jsonConvert.convert<int>(json['departManager']);
  if (departManager != null) {
    getUserByIdEntity.departManager = departManager;
  }
  final String? departmentName = jsonConvert.convert<String>(json['departmentName']);
  if (departmentName != null) {
    getUserByIdEntity.departmentName = departmentName;
  }
  final String? description = jsonConvert.convert<String>(json['description']);
  if (description != null) {
    getUserByIdEntity.description = description;
  }
  final String? documentUrl = jsonConvert.convert<String>(json['documentUrl']);
  if (documentUrl != null) {
    getUserByIdEntity.documentUrl = documentUrl;
  }
  final String? education = jsonConvert.convert<String>(json['education']);
  if (education != null) {
    getUserByIdEntity.education = education;
  }
  final String? educationName = jsonConvert.convert<String>(json['educationName']);
  if (educationName != null) {
    getUserByIdEntity.educationName = educationName;
  }
  final String? email = jsonConvert.convert<String>(json['email']);
  if (email != null) {
    getUserByIdEntity.email = email;
  }
  final String? endTime = jsonConvert.convert<String>(json['endTime']);
  if (endTime != null) {
    getUserByIdEntity.endTime = endTime;
  }
  final String? firstTime = jsonConvert.convert<String>(json['firstTime']);
  if (firstTime != null) {
    getUserByIdEntity.firstTime = firstTime;
  }
  final String? formId = jsonConvert.convert<String>(json['formId']);
  if (formId != null) {
    getUserByIdEntity.formId = formId;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    getUserByIdEntity.id = id;
  }
  final String? userId = jsonConvert.convert<String>(json['userId']);
  if (userId != null) {
    getUserByIdEntity.userId = userId;
  }
  final int? isSystem = jsonConvert.convert<int>(json['isSystem']);
  if (isSystem != null) {
    getUserByIdEntity.isSystem = isSystem;
  }
  final int? isViewAll = jsonConvert.convert<int>(json['isViewAll']);
  if (isViewAll != null) {
    getUserByIdEntity.isViewAll = isViewAll;
  }
  final String? jobNumber = jsonConvert.convert<String>(json['jobNumber']);
  if (jobNumber != null) {
    getUserByIdEntity.jobNumber = jobNumber;
  }
  final String? lastLoginTime = jsonConvert.convert<String>(json['lastLoginTime']);
  if (lastLoginTime != null) {
    getUserByIdEntity.lastLoginTime = lastLoginTime;
  }
  final int? mainPersonInCharge = jsonConvert.convert<int>(json['mainPersonInCharge']);
  if (mainPersonInCharge != null) {
    getUserByIdEntity.mainPersonInCharge = mainPersonInCharge;
  }
  final String? mobile = jsonConvert.convert<String>(json['mobile']);
  if (mobile != null) {
    getUserByIdEntity.mobile = mobile;
  }
  final String? nickname = jsonConvert.convert<String>(json['nickname']);
  if (nickname != null) {
    getUserByIdEntity.nickname = nickname;
  }
  final String? otherUid = jsonConvert.convert<String>(json['otherUid']);
  if (otherUid != null) {
    getUserByIdEntity.otherUid = otherUid;
  }
  final String? personDictId = jsonConvert.convert<String>(json['personDictId']);
  if (personDictId != null) {
    getUserByIdEntity.personDictId = personDictId;
  }
  final String? positionName = jsonConvert.convert<String>(json['positionName']);
  if (positionName != null) {
    getUserByIdEntity.positionName = positionName;
  }
  final String? professionalName = jsonConvert.convert<String>(json['professionalName']);
  if (professionalName != null) {
    getUserByIdEntity.professionalName = professionalName;
  }
  final int? safetyEngineer = jsonConvert.convert<int>(json['safetyEngineer']);
  if (safetyEngineer != null) {
    getUserByIdEntity.safetyEngineer = safetyEngineer;
  }
  final int? technicalPersonnel = jsonConvert.convert<int>(json['technicalPersonnel']);
  if (technicalPersonnel != null) {
    getUserByIdEntity.technicalPersonnel = technicalPersonnel;
  }
  final int? samplingAnalysis = jsonConvert.convert<int>(json['samplingAnalysis']);
  if (samplingAnalysis != null) {
    getUserByIdEntity.samplingAnalysis = samplingAnalysis;
  }
  final String? school = jsonConvert.convert<String>(json['school']);
  if (school != null) {
    getUserByIdEntity.school = school;
  }
  final int? sex = jsonConvert.convert<int>(json['sex']);
  if (sex != null) {
    getUserByIdEntity.sex = sex;
  }
  final String? sexName = jsonConvert.convert<String>(json['sexName']);
  if (sexName != null) {
    getUserByIdEntity.sexName = sexName;
  }
  final String? sign = jsonConvert.convert<String>(json['sign']);
  if (sign != null) {
    getUserByIdEntity.sign = sign;
  }
  final int? specialOperations = jsonConvert.convert<int>(json['specialOperations']);
  if (specialOperations != null) {
    getUserByIdEntity.specialOperations = specialOperations;
  }
  final String? specialWorks = jsonConvert.convert<String>(json['specialWorks']);
  if (specialWorks != null) {
    getUserByIdEntity.specialWorks = specialWorks;
  }
  final List<String>? specialWorksArray = (json['specialWorksArray'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<String>(e) as String).toList();
  if (specialWorksArray != null) {
    getUserByIdEntity.specialWorksArray = specialWorksArray;
  }
  final int? specialitySafe = jsonConvert.convert<int>(json['specialitySafe']);
  if (specialitySafe != null) {
    getUserByIdEntity.specialitySafe = specialitySafe;
  }
  final String? starTime = jsonConvert.convert<String>(json['starTime']);
  if (starTime != null) {
    getUserByIdEntity.starTime = starTime;
  }
  final int? status = jsonConvert.convert<int>(json['status']);
  if (status != null) {
    getUserByIdEntity.status = status;
  }
  final int? taskCount = jsonConvert.convert<int>(json['taskCount']);
  if (taskCount != null) {
    getUserByIdEntity.taskCount = taskCount;
  }
  final String? titleName = jsonConvert.convert<String>(json['titleName']);
  if (titleName != null) {
    getUserByIdEntity.titleName = titleName;
  }
  final int? type = jsonConvert.convert<int>(json['type']);
  if (type != null) {
    getUserByIdEntity.type = type;
  }
  final String? unitName = jsonConvert.convert<String>(json['unitName']);
  if (unitName != null) {
    getUserByIdEntity.unitName = unitName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    getUserByIdEntity.updateBy = updateBy;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    getUserByIdEntity.updateDate = updateDate;
  }
  final String? url = jsonConvert.convert<String>(json['url']);
  if (url != null) {
    getUserByIdEntity.url = url;
  }
  final String? userType = jsonConvert.convert<String>(json['userType']);
  if (userType != null) {
    getUserByIdEntity.userType = userType;
  }
  final String? userTypeName = jsonConvert.convert<String>(json['userTypeName']);
  if (userTypeName != null) {
    getUserByIdEntity.userTypeName = userTypeName;
  }
  final String? username = jsonConvert.convert<String>(json['username']);
  if (username != null) {
    getUserByIdEntity.username = username;
  }
  final List<dynamic>? workRoleId = (json['workRoleId'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (workRoleId != null) {
    getUserByIdEntity.workRoleId = workRoleId;
  }
  final String? workRoleName = jsonConvert.convert<String>(json['workRoleName']);
  if (workRoleName != null) {
    getUserByIdEntity.workRoleName = workRoleName;
  }
  return getUserByIdEntity;
}

Map<String, dynamic> $GetUserByIdEntityToJson(GetUserByIdEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['allocation'] = entity.allocation;
  data['areaCode'] = entity.areaCode;
  data['avatar'] = entity.avatar;
  data['birthday'] = entity.birthday;
  data['branchPersonInCharge'] = entity.branchPersonInCharge;
  data['certificate'] = entity.certificate;
  data['certificateNum'] = entity.certificateNum;
  data['certificateRemind'] = entity.certificateRemind;
  data['certificateUrl'] = entity.certificateUrl;
  data['checkId'] = entity.checkId;
  data['chemistry'] = entity.chemistry;
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['departManager'] = entity.departManager;
  data['departmentName'] = entity.departmentName;
  data['description'] = entity.description;
  data['documentUrl'] = entity.documentUrl;
  data['education'] = entity.education;
  data['educationName'] = entity.educationName;
  data['email'] = entity.email;
  data['endTime'] = entity.endTime;
  data['firstTime'] = entity.firstTime;
  data['formId'] = entity.formId;
  data['id'] = entity.id;
  data['userId'] = entity.userId;
  data['isSystem'] = entity.isSystem;
  data['isViewAll'] = entity.isViewAll;
  data['jobNumber'] = entity.jobNumber;
  data['lastLoginTime'] = entity.lastLoginTime;
  data['mainPersonInCharge'] = entity.mainPersonInCharge;
  data['mobile'] = entity.mobile;
  data['nickname'] = entity.nickname;
  data['otherUid'] = entity.otherUid;
  data['personDictId'] = entity.personDictId;
  data['positionName'] = entity.positionName;
  data['professionalName'] = entity.professionalName;
  data['safetyEngineer'] = entity.safetyEngineer;
  data['technicalPersonnel'] = entity.technicalPersonnel;
  data['samplingAnalysis'] = entity.samplingAnalysis;
  data['school'] = entity.school;
  data['sex'] = entity.sex;
  data['sexName'] = entity.sexName;
  data['sign'] = entity.sign;
  data['specialOperations'] = entity.specialOperations;
  data['specialWorks'] = entity.specialWorks;
  data['specialWorksArray'] = entity.specialWorksArray;
  data['specialitySafe'] = entity.specialitySafe;
  data['starTime'] = entity.starTime;
  data['status'] = entity.status;
  data['taskCount'] = entity.taskCount;
  data['titleName'] = entity.titleName;
  data['type'] = entity.type;
  data['unitName'] = entity.unitName;
  data['updateBy'] = entity.updateBy;
  data['updateDate'] = entity.updateDate;
  data['url'] = entity.url;
  data['userType'] = entity.userType;
  data['userTypeName'] = entity.userTypeName;
  data['username'] = entity.username;
  data['workRoleId'] = entity.workRoleId;
  data['workRoleName'] = entity.workRoleName;
  return data;
}

extension GetUserByIdEntityExtension on GetUserByIdEntity {
  GetUserByIdEntity copyWith({
    int? allocation,
    String? areaCode,
    String? avatar,
    String? birthday,
    int? branchPersonInCharge,
    String? certificate,
    String? certificateNum,
    int? certificateRemind,
    String? certificateUrl,
    int? checkId,
    int? chemistry,
    String? companyCode,
    String? createBy,
    String? createDate,
    String? deleted,
    int? departManager,
    String? departmentName,
    String? description,
    String? documentUrl,
    String? education,
    String? educationName,
    String? email,
    String? endTime,
    String? firstTime,
    String? formId,
    String? id,
    String? userId,
    int? isSystem,
    int? isViewAll,
    String? jobNumber,
    String? lastLoginTime,
    int? mainPersonInCharge,
    String? mobile,
    String? nickname,
    String? otherUid,
    String? personDictId,
    String? positionName,
    String? professionalName,
    int? safetyEngineer,
    int? technicalPersonnel,
    int? samplingAnalysis,
    String? school,
    int? sex,
    String? sexName,
    String? sign,
    int? specialOperations,
    String? specialWorks,
    List<String>? specialWorksArray,
    int? specialitySafe,
    String? starTime,
    int? status,
    int? taskCount,
    String? titleName,
    int? type,
    String? unitName,
    String? updateBy,
    String? updateDate,
    String? url,
    String? userType,
    String? userTypeName,
    String? username,
    List<dynamic>? workRoleId,
    String? workRoleName,
  }) {
    return GetUserByIdEntity()
      ..allocation = allocation ?? this.allocation
      ..areaCode = areaCode ?? this.areaCode
      ..avatar = avatar ?? this.avatar
      ..birthday = birthday ?? this.birthday
      ..branchPersonInCharge = branchPersonInCharge ?? this.branchPersonInCharge
      ..certificate = certificate ?? this.certificate
      ..certificateNum = certificateNum ?? this.certificateNum
      ..certificateRemind = certificateRemind ?? this.certificateRemind
      ..certificateUrl = certificateUrl ?? this.certificateUrl
      ..checkId = checkId ?? this.checkId
      ..chemistry = chemistry ?? this.chemistry
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..departManager = departManager ?? this.departManager
      ..departmentName = departmentName ?? this.departmentName
      ..description = description ?? this.description
      ..documentUrl = documentUrl ?? this.documentUrl
      ..education = education ?? this.education
      ..educationName = educationName ?? this.educationName
      ..email = email ?? this.email
      ..endTime = endTime ?? this.endTime
      ..firstTime = firstTime ?? this.firstTime
      ..formId = formId ?? this.formId
      ..id = id ?? this.id
      ..userId = userId ?? this.userId
      ..isSystem = isSystem ?? this.isSystem
      ..isViewAll = isViewAll ?? this.isViewAll
      ..jobNumber = jobNumber ?? this.jobNumber
      ..lastLoginTime = lastLoginTime ?? this.lastLoginTime
      ..mainPersonInCharge = mainPersonInCharge ?? this.mainPersonInCharge
      ..mobile = mobile ?? this.mobile
      ..nickname = nickname ?? this.nickname
      ..otherUid = otherUid ?? this.otherUid
      ..personDictId = personDictId ?? this.personDictId
      ..positionName = positionName ?? this.positionName
      ..professionalName = professionalName ?? this.professionalName
      ..safetyEngineer = safetyEngineer ?? this.safetyEngineer
      ..technicalPersonnel = technicalPersonnel ?? this.technicalPersonnel
      ..samplingAnalysis = samplingAnalysis ?? this.samplingAnalysis
      ..school = school ?? this.school
      ..sex = sex ?? this.sex
      ..sexName = sexName ?? this.sexName
      ..sign = sign ?? this.sign
      ..specialOperations = specialOperations ?? this.specialOperations
      ..specialWorks = specialWorks ?? this.specialWorks
      ..specialWorksArray = specialWorksArray ?? this.specialWorksArray
      ..specialitySafe = specialitySafe ?? this.specialitySafe
      ..starTime = starTime ?? this.starTime
      ..status = status ?? this.status
      ..taskCount = taskCount ?? this.taskCount
      ..titleName = titleName ?? this.titleName
      ..type = type ?? this.type
      ..unitName = unitName ?? this.unitName
      ..updateBy = updateBy ?? this.updateBy
      ..updateDate = updateDate ?? this.updateDate
      ..url = url ?? this.url
      ..userType = userType ?? this.userType
      ..userTypeName = userTypeName ?? this.userTypeName
      ..username = username ?? this.username
      ..workRoleId = workRoleId ?? this.workRoleId
      ..workRoleName = workRoleName ?? this.workRoleName;
  }
}
